import router from "@/router";
import { useLoginUserStore } from "@/store/userStore";
import ACCESS_ENUM from "@/access/accessEnum";

// 进入页面前，进行权限校验
router.beforeEach(async (to, from, next) => {
  // 获取当前登录用户
  const loginUserStore = useLoginUserStore();
  const loginUser = loginUserStore.loginUser;
  // 当前页面需要的权限
  const needAccess = to.meta?.access ?? ACCESS_ENUM.NOT_LOGIN;
});
